/*
 * Copyright 2013 Nicholas Bilyk
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package jasper.model.elements;

/**
 * An enumeration of the possible restrictions for data types.
 *
 * Source: http://www.w3schools.com/schema/schema_elements_ref.asp
 *
 * @author nbilyk
 */
public enum RestrictionType {

	/**
	 * 	Defines a list of acceptable values.
	 */
	ENUMERATION("enumeration"),

	/**
	 * Specifies the maximum number of decimal places allowed. Must be equal to or greater than zero.
	 */
	FRACTION_DIGITS("fractionDigits"),

	/**
	 * Specifies the exact number of characters or list items allowed. Must be equal to or greater than zero.
	 */
	LENGTH("length"),

	/**
	 * Specifies the upper bounds for numeric values (the value must be less than this value).
	 */
	MAX_EXCLUSIVE("maxExclusive"),

	/**
	 * Specifies the upper bounds for numeric values (the value must be less than or equal to this value).
	 */
	MAX_INCLUSIVE("maxInclusive"),

	/**
	 * Specifies the maximum number of characters or list items allowed. Must be equal to or greater than zero.
	 */
	MAX_LENGTH("maxLength"),

	/**
	 * Specifies the lower bounds for numeric values (the value must be greater than this value).
	 */
	MIN_EXCLUSIVE("minExclusive"),

	/**
	 * Specifies the lower bounds for numeric values (the value must be greater than or equal to this value).
	 */
	MIN_INCLUSIVE("minInclusive"),

	/**
	 * Specifies the minimum number of characters or list items allowed. Must be equal to or greater than zero.
	 */
	MIN_LENGTH("minLength"),

	/**
	 * Defines the exact sequence of characters that are acceptable.
	 */
	PATTERN("pattern"),

	/**
	 * Specifies the maximum number of digits allowed. Must be greater than zero.
	 */
	TOTAL_DIGITS("totalDigits"),

	/**
	 * Specifies how white space (line feeds, tabs, spaces, and carriage returns) is handled.
	 */
	WHITESPACE("whiteSpace");

	public String name;

	private RestrictionType(String name) {
		this.name = name;
	}
}
